package com.szxw.service.impl;

import com.szxw.mapper.BlogMapper;
import com.szxw.pojo.Blog;
import com.szxw.service.BlogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: 苏执小威
 * @Email:1410511702@qq.com
 * @Desc:
 * @Date: 2022/5/17 19:26
 */
@Service
public class BlogServiceImpl implements BlogService {

    @Autowired
    private BlogMapper mapper;

    public void setMapper(BlogMapper mapper) {
        this.mapper = mapper;
    }

    @Override
    public List<Blog> selectAllBlogs() {
        return mapper.selectAllBlogs();
    }

    @Override
    public int blogConuts() {
        return mapper.blogCounts();
    }

    @Override
    public Blog selectBlogById(int id) {
        return mapper.selectBlogById(id);
    }
}
